fix(wefax): include station JSON in Docker image and handle missing file#210
Merged
fix(wefax): include station JSON in Docker image and handle missing file#210
Conversation
data/*.json was excluded by .dockerignore, so wefax_stations.json was never copied into the container image. The volume mounts in docker-compose only cover subdirectories (weather_sat, adsb, etc.), leaving the stations file inaccessible at runtime — causing the /wefax/stations route to 500 and the station/frequency dropdowns to appear empty. Also adds a graceful file-existence check in load_stations() so a missing file logs a warning and returns an empty list instead of an unhandled FileNotFoundError. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
data/*.jsonfrom.dockerignore—wefax_stations.json(andoui_database.json) are static reference data shipped with the app, not runtime output, so they should be bundled in the imageload_stations()so a missing file logs a warning and returns an empty list gracefully instead of crashing with an unhandledFileNotFoundErrorRoot cause
.dockerignoreexcludeddata/*.json, sowefax_stations.jsonwas never copied into the container duringdocker build. Thedocker-compose.ymlvolume mounts only cover specific subdirectories (weather_sat,adsb, etc.) and not the file itself. At runtime,load_stations()would throwFileNotFoundError, the/wefax/stationsroute returned a 500, and the JS silently rendered empty station/frequency dropdowns.Fixes #209
Test plan
docker compose --profile basic up -d --build— station dropdown populates on the WeFax pageoui_database.jsonis also present in the image (Bluetooth OUI lookup unaffected)🤖 Generated with Claude Code